package dao

import (
	"gin_wuwen_back/model"
	"gin_wuwen_back/tool"
	"log"
)

type VideoUrlDao struct {
	*tool.Orm
}

func NewVideoDao() *VideoUrlDao {
	return &VideoUrlDao{tool.Dbengin}

}

func (tmp *VideoUrlDao) GetUrl(name string) *model.VideoUrl {
	var UrlData model.VideoUrl
	_, err := tmp.Where("vname=?", name).Get(&UrlData)
	if err != nil {
		log.Println(err.Error())
		return nil

	}
	return &UrlData

}
